<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>列表渲染</title>
        <!-- 引入Vue -->
        <script type="text/javascript" src="../js/vue.js"></script>
    </head>
    <body>
        <!-- 准备好一个容器-->
        <div id="demo">
            <h2>人员信息</h2>
            <hr />
            <ul v-for='p in person'>
                <li>{{p.name}}---{{p.gender}}---{{p.age}}</li>
            </ul>
        </div>
    </body>

    <script type="text/javascript">
        //阻止 vue 在启动时生成生产提示。
        Vue.config.productionTip = false
        new Vue({
            el:'#demo',
            data:{
                person:[
                    {
                        name:'张三',
                        age:19,
                        gender:'男'
                    },
                    {
                        name:'小花',
                        age:22,
                        gender:'女'
                    },
                    {
                        name:'王五',
                        age:21,
                        gender:'男'
                    },
                    {
                        name:'小美',
                        age:16,
                        gender:'女'
                    },
                ]
            }
        })
    </script>
</html>